package com.qf.commons.data.result;

import lombok.Getter;

/**
 * @author YaoJiXing
 * created 2022/8/16 10:06
 */
@Getter
//枚举类只能有get方法，不能有Set方法
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
public enum RCodes {

    SUCC(200, "成功"),
    FAIL(500, "服务器异常"),
    DATA_CHECKED_ERROR(401, "参数校验异常"),
    FLOW_ERROR(402, "流控限流异常"),
    DEGRADE_ERROR(403, "熔断限流异常"),
    DATA_UNIQUE_ERROR(405, "数据已存在"),
    AUTH_FAIL(406, "必须登录才可以访问该资源"),
    NO_POWER_ERROR(407, "权限不足"),
    TOKEN_GET_ERROR(408, "服务器繁忙，请稍后再试"),
    LOGIN_ERROR(409, "登录失败"),
    RED_TIMEOUT(410, "红包已经过期"),
    RED_OVER(411, "红包已经抢完"),
    RED_EXISTS(412, "红包已经抢过");

    private Integer code;
    private String msg;

    RCodes(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
